home *** CD-ROM | disk | FTP | other *** search
/ Maclife 157 / MACLIFE157-2001-09.ISO.7z / MACLIFE157-2001-09.ISO / Linux / MacOS Tools / BootX 1.2.2 / Sources / lib / MoreOSUtils / MoreOSUtils.h < prev   
Text File  |  2001-07-23  |  3KB  |  84 lines

  1. /*
  2.     File:        MoreOSUtils.h
  3.  
  4.     Contains:    Interface to the OS utilities library.
  5.  
  6.     Written by:    Quinn
  7.  
  8.     Copyright:    Copyright ゥ 1999 by Apple Computer, Inc., all rights reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.  
  20.          <2>     16/3/99    Quinn   Rolled in InterfaceDisableLib from DTS Technote 1137.
  21.          <1>      1/3/99    Quinn   First checked in.
  22. */
  23.  
  24. #pragma once
  25.  
  26. /////////////////////////////////////////////////////////////////
  27.  
  28. // MoreIsBetter Setup
  29.  
  30. #include "MoreSetup.h"
  31.  
  32. // Standard Mac OS interfaces
  33.  
  34. #include <MacTypes.h>
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. /////////////////////////////////////////////////////////////////
  41. // Instruction Cache Flushing
  42.  
  43. extern pascal OSStatus MakeDataPowerPCExecutable(void *address, ByteCount count);
  44.     // Make the memory range described by address and count
  45.     // executable as PowerPC code.  This routine can only return
  46.     // an error when called from classic 68K code.
  47.     
  48. extern pascal OSStatus MakeData68KExecutable(void *address, ByteCount count);
  49.     // Make the memory range described by address and count
  50.     // executable as 68K code.  This routine can never return an
  51.     // error.  It has an error result purely for symmetry with
  52.     // MakeDataPowerPCExecutable.
  53.  
  54. #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  55.  
  56.     // IMPORTANT:
  57.     // This routine is only necessary if you're compiling
  58.     // classic 68K which calls MakeDataPowerPCExecutable.
  59.  
  60.     extern pascal void TermMoreOSUtils(void);
  61.         // A termination routine for this library.  Call it before
  62.         // you unload from memory.
  63.  
  64. #endif
  65.  
  66. /////////////////////////////////////////////////////////////////
  67. // Interrupt Enable and Disable
  68.  
  69. // See DTS Technote 1xxx "Disabling Interrupts on the Traditional Mac OS"
  70. // for details on how this works, why you should avoid it, and what
  71. // alternatives there are.
  72.  
  73. extern pascal UInt16 GetInterruptMask(void);
  74.     // Returns the current interrupt mask, as a value
  75.     // from 0 to 7.
  76.     
  77. extern pascal UInt16 SetInterruptMask(UInt16 newMask);
  78.     // Sets the current interrupt mask, as a value
  79.     // from 0 to 7.
  80.  
  81. #ifdef __cplusplus
  82. }
  83. #endif
  84.